package com.example.qihuibao.dao

import androidx.room.Database
import androidx.room.RoomDatabase

@Database(entities = [UserInfo::class, OfflineRecord::class], version = 1)
abstract class MyDatabase : RoomDatabase() {

    companion object {
        lateinit var db: MyDatabase

//        val MIGRATION_1_2 = object : Migration(1, 2) {
//            override fun migrate(database: SupportSQLiteDatabase) {
//                // 执行从旧版本升级到新版本的 SQL 语句
////            database.execSQL("DROP TABLE user")
//            }
//        }
    }

    abstract fun userInfoDao(): UserInfoDao
    abstract fun offlineRecord(): OfflineRecordDao

}

